#ifndef GENENETWORK_H
#define GENENETWORK_H

#include <QWidget>
#include <QGraphicsScene>
#include <QPainter>
#include <QStyleOption>
#include <QDebug>
#include <QGraphicsItem>
#include <QGraphicsWidget>

#include <genenetworkreader.h>

//namespace Ui {
    //class GeneNetwork;
//}

class Graph;
class BioTableWidget;
class QualAttributeSet;

class GeneNetwork : public QGraphicsWidget
{
    Q_OBJECT

public:
    explicit GeneNetwork(QString filename, QGraphicsItem *parent = 0);
    ~GeneNetwork();
    GeneNetwork(const GeneNetwork& copy);

    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);
    Graph* graph;

    void forgeConnection( GeneNetwork* other );
    void forgeConnection( BioTableWidget* table);

    void addAttributeSet( QPointer<QualAttributeSet> attrs );

protected:


private:
    QString filename;
    QVector< QPointer<QualAttributeSet> > attributeSets;

     bool readFile(QString filename);
    //Ui::GeneNetwork *ui;
};

#endif // GENENETWORK_H
